//中下 玫瑰图
$.get('http://127.0.0.1:5000/task6').done(function (data) {
    var myeCharts = echarts.init(document.querySelector('.panel .pie1'))
    option = {
        color: ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc', '#00FFFF'],
        title: {
            text: '购物篮中农副商品',
            textStyle: {
                color: 'white'
            }
        },
        legend: {
            top: 'bottom',
            textStyle: {
                color: 'white'
            }
        },
        tooltip: {
            trigger: 'item',
            formatter: '{a} <br/>{b} : {c} ({d}%)'
        },
        series: [
            {
                name: '商品数',
                type: 'pie',
                radius: ['20%', '60%'],
                center: ['50%', '50%'],
                roseType: 'area',
                itemStyle: {
                    borderRadius: 8
                },
                data: data.data

            }
        ]
    };
    myeCharts.setOption(option)
})
